import urllib.request
import urllib.parse

url = 'https://www.mcdonalds.com.cn/ajaxs/search_by_point'

data = {
    'point': '39.90374,116.397827',
    'type': ''
}
data = urllib.parse.urlencode(data).encode('utf-8')

headers = {
    'User-Agent':
        'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36'
}

request = urllib.request.Request(url, data, headers)

response = urllib.request.urlopen(request)

content = response.read().decode('utf-8')

print(content)

import json

json_obj = json.loads(content)
print(json_obj)
